package com.cf_houduan.cf_houduan.enums;

import java.util.HashMap;

//接口状态枚举
public enum CodeAndMsgEnum {

    SUCCESS("200","成功"),
    FAIL("400","失败"),
    EXCEPTION("500","异常");

    private String code;
    private String name;

    CodeAndMsgEnum(String code, String name){
        this.code=code;
        this.name=name;
    }

    public String getCode(){ return code; }

    public String getName(){ return name; }

    public static HashMap<String, CodeAndMsgEnum> matnFlagEnumHashMap = new HashMap<>();

    static {
       for(CodeAndMsgEnum matnFlagEnum:values()){
           matnFlagEnumHashMap.put(matnFlagEnum.getCode(),matnFlagEnum);
       }

    }

}
